//
//  KZProdectDetailToolBar.swift
//  BoyeStore
//
//  Created by 朱凯 on 2018/6/26.
//  Copyright © 2018年 itboye. All rights reserved.
//

import UIKit

class KZProdectDetailToolBar: UIView {
    
    convenience init() {
        self.init(frame: .zero)
        
        setupUI()
    }


}

// MARK: ------ 创建视图
extension KZProdectDetailToolBar {
    
    func setupUI() {
        
        self.backgroundColor = UIColor.white
        
        let topline = UIView()
        self.addSubview(topline)
        topline.backgroundColor = kBgColor
        topline.snp.makeConstraints { (m) in
            m.left.top.right.equalTo(0)
            m.height.equalTo(1)
        }
        
        let button = UIButton(type: .custom)
        button.setBackgroundImage(#imageLiteral(resourceName: "商品详情-直达链接"), for: .normal)
        button.setTitle("直达链接", for: .normal)
        button.setTitleColor(UIColor.white, for: .normal)
        button.titleLabel?.font = kFont(15)
        button.titleEdgeInsets = UIEdgeInsetsMake(0, 20, 0, -20)
        self.addSubview(button)
        button.snp.makeConstraints { (m) in
            m.right.top.bottom.equalTo(0)
            m.width.equalTo(self).multipliedBy(0.5)
        }
    }
}
